home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / CTools 2.2.1d / CTools / CTools.rsrc / TEXT_154_Constants.txt < prev    next >
Encoding:
Text File  |  1995-12-01  |  1.2 KB  |  26 lines

  1. Constants:
  2.  
  3. CTools‚Ñ¢ now does constants fairly well!.  Yaaaay!  About 95% of them will require no further editing IF you want #defines.  The remaing 5% will be fixed.  Until then, you have to clean these up manually.  What I do is copy them all out to a new file where I can use Find/Replace without messing up something else, fix them all up fast and copy/paste them back.
  4.  
  5. Here‚Äôs an example of output which balked:
  6.  
  7. Pascal input:
  8. HOMEKEY = chr(1);
  9.  
  10. CTools‚Ñ¢ output:
  11. #define HOMEKEY chr#define 1/***# Expected const identifier ***/
  12.  
  13. Correction:
  14.  
  15. Replace All ‚Äú/***# Expected const identifier ***/‚Äù with a space and Find
  16. all the second ‚Äú#define ‚Äú using Command G/H and replace with a space, to get:
  17.  
  18. #define HOMEKEY chr 1    
  19.  
  20. See...  I only just got it to do constants into defines.  I need to add something to handle parens and such.
  21.  
  22. If the constant has more than a definition and a meaing, such a a plus or anything more than two words, it will go out of synchronization.  The output can still be editied but not as easily as if the were merely commented out ahead of time.
  23.  
  24. On a multi-file, use CTools‚Ñ¢ ‚Äú#define‚Äù keyword to navigate down the file, to get to where these incorrectly translated contants are.
  25.  
  26.